﻿@{
    var purchases = ViewData["Purchases"] as List<Purchase>;
    var products = ViewData["ProductList"] as List<Product>;
    var shops = ViewData["Shops"] as List<Shop>;
}
<div id="tp-bought-root" class="index-mod__root___3ZrD7">
    <div class="tabs-mod__container___ICzlj nav-mod__tabs___1D0ZI">
        <div class="tabs-mod__main___74ZLv">
            <div class="tabs-mod__tab___3vuhD tabs-mod__selected___2DHDY">
                <span class="nav-mod__tab___1PnZ4">
                    <span class="nav-mod__text___3O7jT">所有订单</span>
                    <span class="nav-mod__count___hc9IJ"></span>
                </span>
                <span class="tabs-mod__sep___waJNr">|</span>
            </div>
            <div class="tabs-mod__tab___3vuhD">
                <span class="nav-mod__tab___1PnZ4">
                    <span class="nav-mod__text___3O7jT">待付款</span>
                    <span class="nav-mod__count___hc9IJ"></span>
                </span>
                <span class="tabs-mod__sep___waJNr">|</span>
            </div>
            <div class="tabs-mod__tab___3vuhD">
                <span class="nav-mod__tab___1PnZ4">
                    <span class="nav-mod__text___3O7jT">待发货</span>
                    <span class="nav-mod__count___hc9IJ"></span>
                </span>
                <span class="tabs-mod__sep___waJNr">|</span>
            </div>
            <div class="tabs-mod__tab___3vuhD">
                <span class="nav-mod__tab___1PnZ4">
                    <span class="nav-mod__text___3O7jT">待收货</span>
                    <span class="nav-mod__count___hc9IJ"></span>
                </span>
                <span class="tabs-mod__sep___waJNr">|</span>
            </div>
            <div class="tabs-mod__tab___3vuhD">
                <span class="nav-mod__tab___1PnZ4">
                    <span class="nav-mod__text___3O7jT">待评价</span>
                    <span class="nav-mod__count___hc9IJ"></span>
                </span>
                <span class="tabs-mod__sep___waJNr">|</span>
            </div>
            <div class="tabs-mod__tab___3vuhD">
                <span class="nav-mod__tab___1PnZ4 nav-mod__small___2yzl8">
                    <span class="nav-mod__text___3O7jT">分阶段</span>
                    <span class="nav-mod__count___hc9IJ"></span>
                </span>
            </div>
        </div>
        <div class="tabs-mod__minors___3PnBm">
            <div class="tabs-mod__tab___3vuhD">
                <span id="recycleTab" class="nav-mod__tab___1PnZ4 nav-mod__recycle___2c0Pl">
                    <img class="nav-mod__img___3LK9B" src="~/imgs/TB1G5QqIFXXXXbvXFXXcmA2.FXX-11-12.png" alt="订单回收站">
                    <span class="nav-mod__text___3O7jT">订单回收站</span>
                </span>
            </div>
        </div>
    </div>
    <div class="index-mod__ems-ad___3fP6L js-ems-ad">
        <div data-reactid=".0.1.0">
            <div data-reactid=".0.1.0.0">
                <span></span>
            </div>
        </div>
    </div>
    <form class="container">
        <div class="search-mod__simple-part___3YVUs">
            <input type="text" placeholder="输入商品标题或订单号进行搜索" class="search-mod__order-search-input___29Ui1">
            <button type="submit" class="search-mod__order-search-button___1q3E0">订单搜索</button>
            <button type="button" class="search-mod__more-button___nbIba">
                <span>更多筛选条件</span>
                <img src="~/imgs/TB1jK1dIVXXXXXzXVXXXXXXXXXX.png">
            </button>
        </div>
        <div class="more-part" style="display: none;" data-reactid=".0.2.1">
            <div class="row-mod__row___1aPep search-mod__row___1iPN4">
                <div class="search-mod__col___3ytvL search-mod__col1___-AZN4">
                    <label>
                        <span class="search-mod__label-text___1aQSY">订单类型</span>
                        <span class="field-select-mod__select___xOMpt trade-select search-mod__select-input___35Np6 rc-select rc-select-enabled">
                            <span class="rc-select-selection rc-select-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0">
                                <span class="rc-select-selection__rendered">
                                    <span>全部</span>
                                </span>
                                <span class="rc-select-arrow" tabindex="-1" style="outline:none;">
                                    <b></b>
                                </span>
                            </span>
                        </span>
                    </label>
                </div><div class="search-mod__col___3ytvL search-mod__col2___24ptm">
                    <span class="search-mod__label-text___1aQSY">成交时间</span>
                    <input class="field-input-mod__input___Iwb6D search-mod__select-input___35Np6" placeholder="请选择时间范围起始" type="text">
                    <span class="search-mod__sep___3Np13">-</span>
                    <input class="field-input-mod__input___Iwb6D search-mod__select-input___35Np6" placeholder="请选择时间范围结束" type="text">
                </div>
                <div class="search-mod__col___3ytvL search-mod__col3___2W40T">
                    <label class="search-mod__last-field___3cUFK">
                        <span class="search-mod__label-text___1aQSY">卖家昵称</span>
                        <input class="field-input-mod__input___Iwb6D search-mod__select-input___35Np6" type="text">
                    </label>
                </div>
            </div>
            <div class="row-mod__row___1aPep search-mod__row___1iPN4">
                <div class="search-mod__col___3ytvL search-mod__col1___-AZN4">
                    <label>
                        <span class="search-mod__label-text___1aQSY">评价状态</span>
                        <span class="field-select-mod__select___xOMpt trade-select search-mod__select-input___35Np6 rc-select rc-select-enabled">
                            <span class="rc-select-selection rc-select-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0">
                                <span class="rc-select-selection__rendered">
                                    <span>全部</span>
                                </span>
                                <span class="rc-select-arrow" tabindex="-1" style="outline:none;">
                                    <b></b>
                                </span>
                            </span>
                        </span>
                    </label>
                </div>
                <div class="search-mod__col___3ytvL search-mod__col2___24ptm">
                    <label data-reactid=".0.2.1.1.1.0">
                        <span class="search-mod__label-text___1aQSY" data-reactid=".0.2.1.1.1.0.0">交易状态</span>
                        <span class="field-select-mod__select___xOMpt trade-select search-mod__select-input___35Np6 rc-select rc-select-enabled">
                            <span class="rc-select-selection rc-select-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0">
                                <span class="rc-select-selection__rendered">
                                    <span>全部</span>
                                </span>
                                <span class="rc-select-arrow" tabindex="-1" style="outline:none;">
                                    <b></b>
                                </span>
                            </span>
                        </span>
                    </label>
                </div>
                <div class="search-mod__col___3ytvL search-mod__col3___2W40T">
                    <label class="search-mod__last-field___3cUFK">
                        <span class="search-mod__label-text___1aQSY">售后服务</span>
                        <span class="field-select-mod__select___xOMpt trade-select search-mod__select-input___35Np6 rc-select rc-select-enabled">
                            <span class="rc-select-selection rc-select-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0">
                                <span class="rc-select-selection__rendered">
                                    <span>全部</span>
                                </span>
                                <span class="rc-select-arrow" tabindex="-1" style="outline:none;">
                                    <b></b>
                                </span>
                            </span>
                        </span>
                    </label>
                </div>
            </div>
        </div>
    </form>
    <span id="nav_anchor" style="visibility:hidden;height:0;"></span>
    <table class="bought-table-mod__table___AnaXt table-head-mod__table___17eFg">
        <colgroup data-reactid=".0.4.0">
            <col class="bought-table-mod__col1___3U5RK">
            <col class="bought-table-mod__col2___224Oh">
            <col class="bought-table-mod__col3___J0oe0">
            <col class="bought-table-mod__col4___XvKTC">
            <col class="bought-table-mod__col5___2kktP">
            <col class="bought-table-mod__col6___1KqCQ">
            <col class="bought-table-mod__col7___PpB_p">
        </colgroup>
        <tbody data-reactid=".0.4.1">
            <tr data-reactid=".0.4.1.0">
                <th>宝贝</th>
                <th>单价</th>
                <th>数量</th>
                <th>商品操作</th>
                <th>实付款</th>
                <th>
                    <span class="field-select-mod__select___xOMpt trade-select table-head-mod__status___SBEwU rc-select rc-select-enabled">
                        <span class="rc-select-selection rc-select-selection--single" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" tabindex="0">
                            <span class="rc-select-selection__rendered">
                                <span>交易状态</span>
                            </span>
                            <span class="rc-select-arrow" tabindex="-1" style="outline:none;">
                                <b></b>
                            </span>
                        </span>
                    </span>
                </th>
                <th>交易操作</th>
            </tr>
        </tbody>
    </table>
    <div class="row-mod__row___1aPep js-actions-row-top">
        <div style="float:left;">
            <div class="batch-mod__container___sK68S"></div>
        </div>
        <div style="float:right;">
            <div class="simple-pagination-mod__container___1pC5p">
                <button class="button-mod__button___2HDif button-mod__default___2pRKd button-mod__small___1a8rc simple-pagination-mod__prev___pJnpC" disabled="">上一页</button>
                <button class="button-mod__button___2HDif button-mod__default___2pRKd button-mod__small___1a8rc">下一页</button>
            </div>
        </div>
    </div>
    @if (purchases != null && purchases.Count > 0)
    {
        foreach (var purchase in purchases)
        {
            var product = products.FirstOrDefault(r => r.Id == purchase.ProductId);
            var shop = shops.FirstOrDefault(r => r.Id == product.ShopId);
            <div class="index-mod__order-container___1ur4- js-order-container">
                <div class="bought-wrapper-mod__trade-order___2lrzV bought-wrapper-mod__closed___3pIh6">
                    <table class="bought-table-mod__table___AnaXt bought-wrapper-mod__table___3xFFM">
                        <colgroup>
                            <col class="bought-table-mod__col1___3U5RK">
                            <col class="bought-table-mod__col2___224Oh">
                            <col class="bought-table-mod__col3___J0oe0">
                            <col class="bought-table-mod__col4___XvKTC">
                            <col class="bought-table-mod__col5___2kktP">
                            <col class="bought-table-mod__col6___1KqCQ">
                            <col class="bought-table-mod__col7___PpB_p">
                        </colgroup>
                        <tbody class="bought-wrapper-mod__head___2vnqo">
                            <tr>
                                <td class="bought-wrapper-mod__head-info-cell___29cDO">
                                    <label class="bought-wrapper-mod__checkbox-label___3Va60">
                                        <span class="bought-wrapper-mod__checkbox___11anQ">
                                            <input type="checkbox" disabled="">
                                        </span>
                                        <span class="bought-wrapper-mod__create-time___yNWVS">@(purchase.CreateTime.ToString("yyyy-MM-dd"))</span>
                                    </label>
                                    <span>
                                        <span>订单号</span>
                                        <span>: </span>
                                        <span>@purchase.Id</span>
                                    </span>
                                </td>
                                <td colspan="2" class="bought-wrapper-mod__seller-container___3dAK3">
                                    <span class="seller-mod__container___zFAFV">
                                        <a href="" class="seller-mod__name___2IlQm" title="@shop.Name" target="_blank" rel="noopener noreferrer">@shop.Name</a>
                                    </span>
                                </td>
                                <td>
                                    <span id="webww1">
                                        <span class="ww-light ww-large" data-display="inline" data-nick="@shop.Name" data-tnick="@shop.Name"><a href="" target="_blank" class="ww-inline ww-online" title=""><span></span></a></span>
                                    </span>
                                </td>
                                <td colspan="3" class="bought-wrapper-mod__thead-operations-container___2LwDA">
                                    <span></span>
                                    <a href="" class="bought-wrapper-mod__th-operation___yRtHm" title="编辑标记信息，仅自己可见" target="_blank" rel="noopener noreferrer" id="flag">
                                        <i style="height:17px;width:1px;padding-left:17px;overflow:hidden;vertical-align:middle;font-size:0px;display:inline-block;background:url(/imgs/TB1heyGFVXXXXXpXXXXR3Ey7pXX-550-260.png) no-repeat -176px -176px;"></i>
                                    </a>
                                    <a href="###" class="bought-wrapper-mod__th-operation___yRtHm always-visible" title="删除订单" target="_blank" rel="noopener noreferrer" action="a7" data="[object Object]" id="delOrder">
                                        <i style="height:17px;width:1px;padding-left:17px;overflow:hidden;vertical-align:middle;font-size:0px;display:inline-block;visibility:visible;background:url(/imgs/TB1heyGFVXXXXXpXXXXR3Ey7pXX-550-260.png) no-repeat -239px -176px;"></i>
                                    </a>
                                </td>
                            </tr>
                        </tbody>
                        <tbody>
                            <tr>
                                <td class="sol-mod__no-br___36X3g">
                                    <div class="ml-mod__container___2DOxT production-mod__production___123Ax suborder-mod__production___3WebF">
                                        <div class="ml-mod__media___2sZrj" style="width:80px;">
                                            <a href="/Product/Detail/@(product.Id)" class="production-mod__pic___G8alD" target="_blank" rel="noopener noreferrer">
                                                <img src="@(product.ImageUrl)">
                                                <span> </span>
                                            </a>
                                        </div>
                                        <div style="margin-left:90px;">
                                            <p>
                                                <a href="/Product/Detail/@(product.Id)" target="_blank" rel="noopener noreferrer">
                                                    <span> </span>
                                                    <span style="line-height:16px;">@product.Name</span>
                                                    <span> </span>
                                                </a>
                                                <span></span>
                                                <span></span>
                                                <span></span>
                                            </p>
                                            <p>
                                                <a href="/Rule/Real" title="正品保证" type="3" style="margin-right:8px;" target="_blank">
                                                    <img src="~/imgs/T1SyeXFpliXXaSQP_X-16-16.png">
                                                </a>
                                                <a href="/Rule/XiaoBao" title="如实描述" type="3" style="margin-right:8px;" target="_blank"><img src="~/imgs/TB1PDB6IVXXXXaVaXXXXXXXXXXX.png"></a>
                                            </p>
                                        </div>
                                    </div>
                                </td>
                                <td class="sol-mod__no-br___36X3g">
                                    <div class="price-mod__price___3_8Zs">
                                        <p>
                                            <span>￥</span>
                                            <span>@(Math.Round(product.PreferentialPrice, 2))</span>
                                        </p>
                                    </div>
                                </td>
                                <td class="sol-mod__no-br___36X3g">
                                    <div>
                                        <p>@(purchase.BuyCount)</p>
                                    </div>
                                </td>
                                <td>
                                    <div>
                                        <p style="margin-bottom:3px;">
                                            <span class="text-mod__link___1rXmw text-mod__hover___1TDrR" action="a3">申请售后</span>
                                        </p>
                                    </div>
                                </td>
                                <td class="">
                                    <div>
                                        <div class="price-mod__price___3_8Zs">
                                            <p>
                                                <strong>
                                                    <span>￥</span>
                                                    <span>@(purchase.TotalPrice)</span>
                                                </strong>
                                            </p>
                                        </div>
                                        <p style="color:#6c6c6c;font-family:verdana;">
                                            <span></span>
                                            <span></span>
                                            <span></span>
                                            <span></span>
                                        </p>
                                        <div style="font-family:verdana;">
                                            <div></div>
                                        </div>
                                        <span></span>
                                    </div>
                                </td>
                                <td class="">
                                    <div>
                                        <p style="margin-bottom:3px;"><span class="text-mod__link___1rXmw">购买成功</span></p>
                                        <div>
                                            <p style="margin-bottom:3px;">
                                                <a href="" class="text-mod__link___1rXmw text-mod__hover___1TDrR" target="_blank" rel="noopener noreferrer" id="viewDetail">订单详情</a>
                                            </p>
                                        </div>
                                    </div>
                                </td>
                                <td class="">
                                    <div>
                                        <p style="margin-bottom:3px;">
                                            <a href="" class="text-mod__link___1rXmw text-mod__hover___1TDrR" target="_blank" rel="noopener noreferrer">追加评论</a>
                                        </p>
                                        <p style="margin-bottom:3px;">
                                            <span class="text-mod__link___1rXmw text-mod__hover___1TDrR" action="a1">再次购买</span>
                                        </p>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        }
    }
    else
    {
        <div class="index-mod__empty-list___3CaW2 js-empty-list">
            <img class="index-mod__empty-list-img___3kyoO" src="~/imgs/avif/noorder.avif">
            <span data-reactid=".0.7.1">没有符合条件的宝贝，请尝试其他搜索条件。</span>
        </div>
    }

    <div class="row-mod__row___1aPep js-actions-row-bottom">
        <div style="float:left;">
            <div class="batch-mod__container___sK68S"></div>
        </div>
        <div style="float:right;">
            <ul class="pagination " unselectable="unselectable">
                <li title="上一页" class="pagination-disabled pagination-prev"><a></a></li>
                <li title="1" class="pagination-item pagination-item-1 pagination-item-active"><a>1</a></li>
                <li title="2" class="pagination-item pagination-item-2"><a>2</a></li>
                <li title="3" class="pagination-item pagination-item-3"><a>3</a></li>
                <li title="4" class="pagination-item pagination-item-4"><a>4</a></li>
                <li title="下一页" class="pagination-next"><a></a></li>
                <noscript></noscript>
            </ul>
        </div>
    </div>
    <div class="loading-mod__loading___3nGTY loading-mod__hidden___1tIoI">
        <div class="loading-mod__bg___2ylNX loading-mod__q___3pSfD"></div>
        <div class="loading-mod__bg___2ylNX loading-mod__z___3Le9C">
        </div>
    </div>
</div>